package com.lksoft.bz.action;

import java.awt.event.ActionEvent;
import java.awt.print.PrinterJob;
import java.io.IOException;

import javax.swing.AbstractAction;

import com.lksoft.bz.Bz;

public class PageSetupAction extends AbstractAction {
	private static final long serialVersionUID = -5008023866684342044L;
	
	private Bz bz;
	
	/**
	 * @param bz The program
	 * @throws IOException 
	 */
	public PageSetupAction(Bz bz) throws IOException{
		this.bz = bz;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		PrinterJob job = PrinterJob.getPrinterJob();
		bz.setPageFormat(job.pageDialog(bz.getPageFormat()));
	}
}
